<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Core\Entity;

use Doctrine\ORM\Mapping as ORM;

/** @ORM\Entity */
class Categories {

    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    protected $id;

    /** @ORM\Column(type="string") */
    protected $name;
    
    /**
     * @var Collection
     * @ORM\OneToMany(targetEntity="Core\Entity\SubCategories", mappedBy="categoryId")
     */
    protected $subcategories;

    function getId() {
        return $this->id;
    }

    function getName() {
        return $this->name;
    }

    function setId($id) {
        $this->id = $id;
    }

    function setName($name) {
        $this->name = $name;
    }

    function getSubcategories() {
        return $this->subcategories;
    }


    
}
